-
Notifications
You must be signed in to change notification settings - Fork 6.8k
feat(material/slider): add customizable thumb dimensions for m2 and m3 #31439
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
feat(material/slider): add customizable thumb dimensions for m2 and m3 #31439
Conversation
I believe you would also need to add some logic to src/material/slider/slider-thumb.ts so that the ripple diameter is calculated based on the slider-thumb-width and slider-thumb-height |
ac555fa
to
dba1885
Compare
Thanks @wagnermaciel, I have created |
dba1885
to
f8cab36
Compare
@@ -117,7 +117,8 @@ export class MatSliderVisualThumb implements _MatSliderVisualThumb, AfterViewIni | |||
return; | |||
} | |||
|
|||
this._ripple.radius = 24; | |||
const thumbDiameter = this._hostElement.offsetHeight || 48; | |||
this._ripple.radius = thumbDiameter / 2; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should add a token for this and default to computing this based on the slider thumb width/height (whichever is greater).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm bit new to css things, not sure I got it completely. As, in adding new token for this radius ? Also, do we need to update slider-input.ts
too ? Line 778 where ripplePadding
is 48px
?
f8cab36
to
9019a0e
Compare
Fixes #31101